/*

Author   : chaos

FileName : dyna_object.cpp

Date     : 12/08/17 13:08:22

*/
#include <iostream>
#include <cstring>

using namespace std;
class Book{
    private:
        char name [30];
        long index;
    public:
        Book(char * i_name): index(-1)
    {
        strcpy(name,i_name);
    }

        void show_data()
        {
            cout << " name: " << name << " index : " << index << endl;
        }
};
using namespace std;

int main(int argc ,char *argv[])
{
    Book *book_ptr = new Book(" The C++ Bible");

    book_ptr->show_data();

    return 0;
}
